package com.zh.generator;


/**
 * @author zhanxf
 */
public class HzCodeGenerator {
    /**
     * 需要去掉的表前缀
     */
    public static String[] TABLE_PREFIX = {};
    /**
     * 需要生成的表名(两者只能取其一)
     */
    public static String[] INCLUDE_TABLES = {
            "balance_his", "ip_proxy", "menu", "orders", "user","options"
    };
    /**
     * 基础业务字段
     */
    public static String[] SUPER_ENTITY_COLUMNS = {"createTime", "updateTime", "id"};

    /**
     * RUN THIS
     */
    public static void run() {
        CodeGenerator generator = new CodeGenerator();
        generator.setUrl("jdbc:mysql://127.0.0.1:3306/ipmarket?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false");
        generator.setUsername("root");
        generator.setPassword("root");
        generator.setServiceName("");
        generator.setPackageName("com.zh.modules.app");
//        generator.setControllerModuleName("hz-road-web");
//        generator.setControllerPackageName("com.jnf.hzroad.web");
        generator.setTablePrefix(TABLE_PREFIX);
        generator.setIncludeTables(INCLUDE_TABLES);
        generator.setHasSuperEntity(Boolean.TRUE);
        generator.setSuperEntityColumns(SUPER_ENTITY_COLUMNS);
        generator.setPackageDir("C:\\Users\\hyxf\\Documents\\project\\ip-market");

        generator.run();
    }

    public static void main(String[] args) {
        run();
    }
}

